﻿using System;

namespace CoreEx.ComponentModel
{
    /// <summary>
    /// Represent a nested property 
    /// </summary>
    [Serializable]
    public class NestedProperty
    {
        private string _name;

        /// <summary>
        /// Creates a new instance of the <see cref="NestedProperty"/> class.
        /// </summary>
        public NestedProperty()
        {
        }


        /// <summary>
        /// Creates a new instance of the <see cref="NestedProperty"/> class.
        /// </summary>
        /// <param name="name">The name/property path of the bindable property.
        /// <remarks>
        /// Nested properies can be described as property paths. Ex Person.Address.StreetAddress
        /// </remarks>
        /// </param>                
        /// </param>        
        public NestedProperty(string name)
        {
            _name = name;
        }


        /// <summary>
        /// Gets or sets the name of the property.
        /// </summary>
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }


    }
}
